package dl.bukkit.myststus.hook;

import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.entity.Player;

public class PlaceholderAPIHook implements IHook {

    private static PlaceholderAPIHook inst;

    PlaceholderAPIHook() {
        inst = this;
    }

    @Override
    public String getPlugin() {
        return "PlaceholderAPI";
    }

    @Override
    public boolean isDepend() {
        return false;
    }

    public static String toString(Player player, String str) {
        return inst.isEnable() ? PlaceholderAPI.setPlaceholders(player, str) : str;
    }
}
